package cn.zust.edu.cn;

public class Circle implements IShape {
    private Point ptCenter;
    private int radius;

    public Circle(Point center, int r) {
        this.ptCenter = new Point(center);
        this.radius = r;
    }

    @Override
    public double perimeter() {
        return 2 * Math.PI * radius;
    }

    @Override
    public double area() {
        return Math.PI * radius * radius;
    }

    @Override
    public void draw() {
        System.out.printf("Drawing Circle at (%d, %d) radius=%d\n",
                ptCenter.x, ptCenter.y, radius);
    }
}
